package com.bytedance.improvingroad.activity

import androidx.core.widget.doOnTextChanged
import com.bytedance.improvingroad.databinding.ActivityLightWidgetBinding
import com.google.android.material.snackbar.Snackbar

class LightWidgetActivity : BaseBindingActivity<ActivityLightWidgetBinding>() {
    override fun initData() {

    }

    override fun initListener() {
        binding.textField.editText?.doOnTextChanged { text, start, before, count ->

        }
        Snackbar.make(binding.root,"我是Snackbar",Snackbar.LENGTH_LONG)
            .setAction("撤销"){
                //撤销后的响应
            }
            //设置位于哪个控件的上方
            .setAnchorView(binding.textField)
            .show()
    }

}